#ifndef MDIO_HPP
#define MDIO_HPP

#include <stdint.h>

namespace MDIO {

class STA {
public:
    enum Version {
        Version_Clause_22,
        Version_Clause_45,
    };
public:
    virtual ~STA();

    virtual bool open() = 0;
    virtual bool close() = 0;

    virtual bool readRegister(uint8_t phy_ad,uint8_t reg_ad,uint16_t *buffer) = 0;
    virtual bool readRegister(uint8_t prt_ad,uint8_t dev_ad,uint16_t reg_ad,uint16_t *buffer) = 0;

    virtual bool writeRegister(uint8_t phy_ad,uint8_t reg_ad,uint16_t *buffer) = 0;
    virtual bool writeRegister(uint8_t prt_ad,uint8_t dev_ad,uint16_t reg_ad,uint16_t *buffer) = 0;

    virtual bool setVersion(Version version) = 0;
};

}

#endif
